// import { recartCount } from '@/api'
//home模块的仓库
const state = {
  cartCount: 0
  //home仓库中存储三级菜单的数据
}
//mutions是唯一修改state的地方
const mutations = {
    CARTCOUNT(state,cartcount){
        state.cartCount=cartcount
    }

}
//action|用户处理派发action地方的，可以书写异步语句、自己逻辑地方
const actions = {

  // eslint-disable-next-line no-unused-vars
  async saveCartCount({ commit },res) {
    // let result = await recartCount()
    // console.log(result)
    commit("CARTCOUNT",res)
    
   
  }
}
//计算属性
const getters = {}
export default {
  state,
  mutations,
  actions,
  getters
}
